form method = 'get'
  .panel.panel-default
    .panel-heading
      = link_to "新增" , new_customer_review_path, class: "btn btn-primary btn-xs"

    .panel-body
      .table-responsive
        table.table.table-bordered.table-hover
          tr
            th 客户姓名
            th 车牌号
            th 任务类型
            th 回访人
            th 回访方式
            th 计划回访日期
            th 时间回访日期
            th 是否回访成功
            th 状态
            th 操作
            
          -@customer_reviews.each do |cr|
            tr
              td = cr.customer.name
              td = cr.customer.car_num
              td = cr.task_type
              td = cr.user.name rescue ""
              td = cr.review_method
              td = cr.plan_review.strftime('%Y-%m-%d')
              td = cr.actual_review.strftime('%Y-%m-%d') rescue ""
              td = cr.is_success
              td = cr.status
              td
                = link_to "回访", record_customer_review_path(:id => cr.id), class: "btn btn-warning btn-xs", style: "margin-right:10px;"
                = link_to "修改", edit_customer_review_path(:id => cr.id), class: "btn btn-success btn-xs", style: "margin-right:10px;"
                = link_to "删除" , customer_review_path(:id => cr.id), :method => "DELETE", data: {confirm: '一旦删除,将无法恢复,是否删除?'}, class: "btn btn-danger btn-xs"

         

          